<template>
  <div class="input">
    <el-input
      v-model="input"
      @input="inpSearch"
      placeholder="请输入内容"
    ></el-input>
  </div>
</template>

<script>
import { mapActions, mapMutations } from "vuex";
export default {
  data() {
    return {
      input: "",
    };
  },
  methods: {
    ...mapActions("crud", ["search"]),
    ...mapMutations("crud", ["SET_LOADING"]),
    inpSearch() {
      this.SET_LOADING()
      this.search({
         input: this.input
      });
    },
  },
};
</script>

<style lang="scss">
.input {
  .el-input__inner {
    width: 240px;
  }
}
</style>